At present, in order to offer a variety of applications in terminals, to reflect the diversity of the terminals and to improve their core competitiveness, numerous manufacturers of Android terminals have come to cooperate with third-party application providers to thereby preset applications, well experienced by and popular to users, as system applications of the terminals. However due to the open-source nature and the de-compilation possibility of the applications in the Android system, many of the third-party application providers will not provide codes and other information of the applications directly but typically package their codes and other core technologies in the form of library files for security and provide the manufacturers of Android terminals with the library files, and then the library files are run and loaded by the users or the manufacturers in the Android terminals to perform specific functions of the applications.
The applications in the Android terminals can be categorized into system applications and user applications, where a system application is an application preset by a manufacturer and characterized in that the system application is stored in a read-only system partition (the /system partition), and a library file corresponding thereto needs to be stored under a dynamic library file directory of system applications (the /system/lib directory) and could not be uninstalled; and a user application is an application selected by a user for installation and characterized in that the application is stored in a readable and writable user partition (the /data partition), and a library file corresponding thereto is stored in a dynamic library file directory of applications (the /data/app-lib directory) upon installation and can be uninstalled by the user.
When the application of the system application including the library file is preset, the library file is generated under the /system/lib directory, and when the system application is upgraded automatically, the updated library file can only be written into the /data/app-lib directory due to the read-only property of the system partition. When the application of the Android system is run, the library file is loaded in a general interface scheme, and in a particular process thereof, the library file is searched for by the name of the library file and loaded, where in a particular search process, firstly the /system/lib directory is searched for a library file matching the package name of an upgrade installation package, and if the library file exists, then it is loaded; otherwise, secondly the /data/app-lib directory is searched for a library file matching the package name of the upgrade installation package, and if the library file is found, then it is loaded.
Apparently in the mechanism of the Android system to load a library file, firstly the /system/lib directory is searched, and when some system application A is upgraded automatically, an upgraded library file is generated under the /data/app-lib directory, and at this time, there are an original library file under the /system/lib directory and the upgraded library file under the /data/app-lib directory. Moreover the library file, name of the original library file and the library file name of the post-grade library file are the same for the system application. Thus the Android terminal loading the library file searches the /system/lib directory by the package name of an upgrade installation package for a library file matching the upgrade installation package, will loading the original library file without searching for and loading the library file under the /data/app-lib directory, so that the upgraded library file can not be loaded successfully.
In order to update the system application, the library file under the /system/lib library is typically updated by upgrading the Android system to thereby load successfully the upgraded library file. Particularly the entire system partition can be erased and written into so that the upgraded library file is put directly into the /system/lib directory and packaged to thereby upgrade the entire system. Thereafter when the system application load the library files, the library file under the /system/lib director is the upgraded library file. However the entire Android system may be upgraded due to the upgrade of the library file at an increase in overhead of the system while hindering the system application from being improved and updated constantly, thus lowering the experience of the user.